const sharp = require('sharp');
const path = require('path');

const roundedCorners = Buffer.from(
  '<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
);
 
sharp(roundedCorners)
  .resize(200, 200)
  .png().toBuffer();

sharp(path.resolve(__dirname, '../fixtures/img.jpg'))
  .resize({ width: 100, height: 100 })
  .jpeg().toBuffer();
